﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace Orion.Lib
{
    public class SpawnSimpleMob : ITrigger
    {
        
        public SpawnSimpleMob()
        {

        }

        #region ITrigger Members

        public void ActFrame(ITriggerTarget target)
        {
            var trgt = (StageScreen)target;
            var newEn = new Enemy.BaseEnemy(MyGame.staticContent.Load<Texture2D>("enemy"));
            
            newEn.PossitionX = new Random().Next(newEn.texture.Width, MyGame.graphics.PreferredBackBufferWidth - newEn.texture.Width);
            newEn.PossitionY = newEn.texture.Height * -1;
            trgt.Enemies.Add(newEn);
        }

        #endregion
    }
}
